<?php
require_once '../data/connect.class.php';
$connect = new Connect("localhost","root","","email");

$id = $_POST['id'];

if (isset($id)) {
	$sql="select ap.url, af.param, af.name from admin_page as ap, admin_func as af where ap.id='".$id."' and ap.id=af.page_id";
	$resultSet = $connect->execute($sql);
	foreach($resultSet as $res) {
		echo '<div class="sidebar_item" onclick="user_manage(\''.$res['url'].'\',\''.$res['param'].'\')" >';
		echo $res['name'];
		echo '</div>';
	}
}

?>